Translucent Sums: A Foundation for Higher-Order Module Systems

نویسنده

  • Mark Lillibridge
چکیده

The ease of understanding, maintaining, and developing a large program depends crucially on how it is divided up into modules, which is constrained by the available modular programming facilities (“module system”) of the programming language being used. Experience with Standard ML’s module system has shown the usefulness of functions mapping modules to modules and modules with module subcomponents. For example, functions over modules permit abstract data types (ADTs) to be parameterized by other ADTs, and submodules permit modules to be organized hierarchically. Module systems with such facilities are called higher-order, by analogy with higherorder functions. Previous higher-order module systems can be classified as either “opaque” or “transparent.” Opaque systems totally obscure information about the identity of type components of modules, often resulting in overly abstract types. This loss of type identities precludes most interesting uses of higher-order features. Transparent systems, on the other hand, completely reveal type identities by inspecting module implementations, which subverts data abstraction and prevents separate compilation. In this dissertation, I describe a novel approach that avoids these problems based on a new type-theoretic concept, the translucent sum. A translucent sum is a kind of weak sum that can optionally specify the identity of its type components. Under my approach type identities are not determined by inspecting module implementations, permitting separate compilation. By default, module operations reveal the connections between the types in their input and output modules. However, these connections can be obscured using type coercion. This controlled visibility permits data abstraction where desired without limiting the uses of higher-order features. My approach also allows modules to be treated as first-class values, a potentially valuable feature. In order to lay out the groundwork for my new approach to designing higher-order module systems and to demonstrate its utility, I develop in complete detail a kernel system using my approach. I establish formally the theoretical properties of the system, including soundness even in the presence of side effects. I also show how the system may be effectively type checked.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Dynamic Translucency with Abstraction Kinds and Higher-Order Coercions

When a module language is combined with forms of non-parametric type analysis, abstract types require an opaque dynamic representation in order to maintain abstraction safety. As an idealisation of such a module language, we present a foundational calculus that combines higher-order type generation, modelling type abstraction, with singleton kinds, modelling translucency. In this calculus, type...

متن کامل

Dynamic Translucency with Abstraction Kinds

When a module language is combined with forms of non-parametric type analysis, abstract types require an opaque dynamic representation in order to maintain abstraction safety. As an idealisation of such a module language, we present a foundational calculus that combines higher-order type generation, modelling type abstraction, with singleton kinds, modelling translucency. In this calculus, type...

متن کامل

A Polymorphic Language With First-Class Modules

Modules provide a grouping mechanism in modern programming languages that provide both syntactic and semantic support for constructing modular programs. Existing languages with modules are strat-iied-the module system \sits on top of" the core language. This paper presents a language fragment where modules are rst-class objects and are hence part of the core language. Modules are deened by exte...

متن کامل

On H-cofinitely supplemented modules

A module $M$ is called $emph{H}$-cofinitely supplemented if for every cofinite submodule $E$ (i.e. $M/E$ is finitely generated) of $M$ there exists a direct summand $D$ of $M$ such that $M = E + X$ holds if and only if $M = D + X$, for every submodule $X$ of $M$. In this paper we study factors, direct summands and direct sums of $emph{H}$-cofinitely supplemented modules. Let $M$ be an $emph{H}...

متن کامل

Effects of Aging on Mechanical and Optical Properties of Translucent and Opaque Zirconia

Background and Aim: This study evaluated the effect of hydrothermal aging on opti-cal and mechanical properties of opaque and translucent zirconia. Materials and Methods: For the biaxial flexural strength (BFS) test, 40 sintered opaque and translucent disc-shaped zirconia, and for the assessment of surface rough-ness and optical properties, 20 specimens were fabricated and artificially aged in...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1996